package com.smbms.dao;

import com.smbms.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface UserMapper {
    User getUserByLogin(Map<String,Object> paramsMap);

    int getUserCount(@Param("userName") String userName,@Param("userRole") Integer userRole);

    List<User> getUserList(@Param("userName") String userName,@Param("userRole") Integer userRole,
                           @Param("start") Integer start,@Param("pageSize") Integer pageSize);

    int delUser(Integer id);

    int getCountByUserCode(String userCode);

    int addUser(User user);

    User getUserById(Integer id);

    int getCountByUserCodeAndId(@Param("userCode") String userCode,@Param("id") Integer id);

    int updateUser(User user);

    List<User> getUserList2(@Param("userName")String userName,@Param("userRole") Integer userRole);
}
